import { $axios } from '@/utils/http';

// 获取禁言表
export async function getAllWrite(params?: RecordItem) {
  return $axios.request({
    url: 'http://localhost:8090/dyh/advice/getAllWrite',
    method: 'GET',
    params,
  });
}

// 删除资讯
export async function removeWrite(params?: RecordItem) {
  return $axios.request({
    url: 'http://localhost:8090/dyh/advice/removeWrite',
    method: 'GET',
    params,
  });
}

// 编辑资讯
export async function updateWrite(params?: RecordItem) {
  return $axios.request({
    url: 'http://localhost:8090/dyh/advice/updateWrite',
    method: 'GET',
    params,
  });
}

// id查找资讯
export async function selectWriteById(params?: RecordItem) {
  return $axios.request({
    url: 'http://localhost:8090/dyh/advice/selectWriteById',
    method: 'GET',
    params,
  });
}

// 标题查找资讯
export async function selectWriteByName(params?: RecordItem) {
  return $axios.request({
    url: 'http://localhost:8090/dyh/advice/selectWriteByName',
    method: 'GET',
    params,
  });
}

// 新增资讯
export async function addWrite(params?: RecordItem) {
  return $axios.request({
    url: 'http://localhost:8090/dyh/advice/addWrite',
    method: 'POST',
    params,
  });
}
